//
//  RegisterView.m
//  豆瓣终极版
//
//  Created by dllo on 15/12/19.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "RegisterView.h"

@interface RegisterView ()
@property (nonatomic, retain) UILabel *registerUserNameLab;
@property (nonatomic, retain) UILabel *registerKeyLab;
@property (nonatomic, retain) UILabel *confirmKeyLab;
@property (nonatomic, retain) UILabel *emialLab;
@property (nonatomic, retain) UILabel *numberLab;

@end
@implementation RegisterView

- (void)dealloc{
    [_registerUserNameTextField release];
    [_registerKeyTextField release];
    [_confirmKeyTextField release];
    [_emialTextField release];
    [_numberTextField release];
    [_registerUserNameLab release];
    [_registerKeyLab release];
    [_confirmKeyLab release];
    [_emialLab release];
    [_numberLab release];
    [super dealloc];
    
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createRegisterSubviews];
    }
    return self;
}

- (void)createRegisterSubviews{
    
    self.registerUserNameLab = [[UILabel alloc] initWithFrame:CGRectMake(30, 120, 200, 40)];
    self.registerUserNameLab.text = @"用户名:";
    self.registerUserNameLab.font = [UIFont systemFontOfSize:22];
    [self addSubview:self.registerUserNameLab];
    [_registerUserNameLab release];
    
    self.registerKeyLab = [[UILabel alloc] initWithFrame:CGRectMake(30, 180, 200, 40)];
    self.registerKeyLab.text = @"密码:";
    
    self.registerKeyLab.font = [UIFont systemFontOfSize:22];
    [self addSubview:self.registerKeyLab];
    [_registerKeyLab release];
    
    self.confirmKeyLab = [[UILabel alloc] initWithFrame:CGRectMake(30, 240, 200, 40)];
    self.confirmKeyLab.text = @"确认密码:";
    self.confirmKeyLab.font = [UIFont systemFontOfSize:22];
    [self addSubview:self.confirmKeyLab];
    [_confirmKeyLab release];
    
    self.emialLab = [[UILabel alloc] initWithFrame:CGRectMake(30, 300, 200, 40)];
    self.emialLab.text = @"邮箱:";
    self.emialLab.font = [UIFont systemFontOfSize:22];
    [self addSubview:self.emialLab];
    [_emialLab release];
    
    self.numberLab = [[UILabel alloc] initWithFrame:CGRectMake(30, 360, 200, 40)];
    self.numberLab.text = @"联系方式:";
    self.numberLab.font = [UIFont systemFontOfSize:22];
    [self addSubview:self.numberLab];
    [_numberLab release];
    
    self.registerUserNameTextField = [[UITextField alloc] initWithFrame:CGRectMake(140, 120, 200, 40)];
    self.registerUserNameTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.registerUserNameTextField.placeholder = @"请输入用户名";
    [self addSubview:self.registerUserNameTextField];
    [_registerUserNameTextField release];
    
    self.registerKeyTextField = [[UITextField alloc] initWithFrame:CGRectMake(140, 180, 200, 40)];
    self.registerKeyTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.registerKeyTextField.placeholder = @"请输入密码";
    self.registerKeyTextField.secureTextEntry = YES;
    [self addSubview:self.registerKeyTextField];
    [_registerKeyTextField release];
    
    self.confirmKeyTextField = [[UITextField alloc] initWithFrame:CGRectMake(140, 240, 200, 40)];
    self.confirmKeyTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.confirmKeyTextField.placeholder = @"再次输入密码";
    self.confirmKeyTextField.secureTextEntry = YES;
    [self addSubview:self.confirmKeyTextField];
    [_confirmKeyTextField release];
    
    self.emialTextField = [[UITextField alloc] initWithFrame:CGRectMake(140, 300, 200, 40)];
    self.emialTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.emialTextField.placeholder = @"请输入邮箱";
    [self addSubview:self.emialTextField];
    [_emialTextField release];
    
    self.numberTextField = [[UITextField alloc] initWithFrame:CGRectMake(140, 360, 200, 40)];
    self.numberTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.numberTextField.placeholder = @"请输入联系方式";
    [self addSubview:self.numberTextField];
    [_numberTextField release];
    
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [_registerUserNameTextField resignFirstResponder];
    [_registerKeyTextField resignFirstResponder];
    [_confirmKeyTextField resignFirstResponder];
    [_emialTextField resignFirstResponder];
    [_numberTextField resignFirstResponder];
    
}



@end
